# coding=utf-8
from framework.base_page import BasePage

class LoginPage(BasePage):
    input_username = "xpath=>//input[@type='text']"
    input_password = "xpath=>//input[@type='password']"
    btn_login = "xpath=>//*[@id='__layout']/div/div/div[2]/div/div[1]/div/div/button"
    

    def type_username(self, text):
        self.type(self.input_username, text)
        self.sleep(1)

    def type_password(self, text):
        self.type(self.input_password, text)
        self.sleep(1)

    def clear_username(self):
        self.double_click(self.input_username)
        self.sleep(1)

    def clear_password(self):
        self.double_click(self.input_password)
        self.sleep(1)

    def click_btn_login(self):
        self.click(self.btn_login)
        self.sleep(3)